home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 May / macformat-024.iso / Shareware City / Science / Survival Folder / Macros / TimeMacro 1 < prev   
Encoding:
Text File  |  1995-02-22  |  901 b   |  22 lines  |  [TEXT/MJUA]

  1. MACRO 'TimeDependent';
  2.  
  3. {this macro assumes that you selected VAR1 as time dependent covariate}
  4. {and VAR2 as fixed covariate.Notice that rVar[] addresses to data in  }
  5. {the selected vars array while rData[] addresses to the data in the   }
  6. {active data array loded with the Get Data option of the File Menu.   }
  7. {If the value of the variable in columm 2 of the data matrix is less  }
  8. {than 650 the selected VAR1 takes the value of zero (0);otherwise its }
  9. {value is substracted from the average value for that variable. This  }
  10. {latter operation should be done for both, time dependent and fixed   }
  11. {covariate, to avoid internal overflow errors.}
  12.  
  13.  
  14. begin
  15.  
  16. {rVar[1] is selected as time dependent covariate = age;survival times in rData[2]}
  17.  
  18.     FUNCTION
  19.          If rData[2] => 650  then rVar[1]:= (rVar[1] - rMean[1]) else rVar[1]:= 0;
  20.             rVar[2]:= (rVar[2] - rMean[2]); {Fixed covariate = grade}
  21.   end;
  22. end;